package com.jiuyin.dianjing.ui.activity.setting;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jiuyin.dianjing.R;
import com.jiuyin.dianjing.app.HelperApplication;
import com.jiuyin.dianjing.ui.activity.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

import static com.jiuyin.dianjing.api.constant.ApiConstant.KEY_POST;

public class SettingSecurityActivity extends BaseActivity {
    @BindView(R.id.tv_phone)
    TextView mPhone;
    @BindView(R.id.tv_id)
    TextView mID;


    @Override
    protected int setLayoutId() {
        return R.layout.activity_setting_security;
    }

    @Override
    protected void initData() {


    }

    @Override
    protected void initView() {
        setTitle(R.string.setting_account_security);
        mPhone.setText(HelperApplication.getMobile());
        mID.setText(HelperApplication.getID());
    }

    @OnClick({R.id.tv_modify_pwd, R.id.rl_phone})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_modify_pwd:
                goTargetActivity(ModifyPwdActivity.class);
                break;
            case R.id.rl_phone:
                Bundle bundle = new Bundle();
                bundle.putSerializable(KEY_POST, ModifyPhoneActivity.class);
                goTargetActivity(ModifyPhoneVerifyActivity.class, bundle);
                break;

        }
    }

}
